package pool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

public class PoolTest {

    public static void main(String[] args) {

        AtomicInteger atomicInteger = new AtomicInteger();

        ThreadPool threadPool = new ThreadPool(5, 10, 30, TimeUnit.SECONDS, 10, r ->
                new Thread(r, "线程t" + atomicInteger.incrementAndGet()),
                (queue, task) -> {
                    throw new RuntimeException("拒绝");
                });

    }

}
